<?php
/**
 * ResMania
 * More Information contact: info@resmania.com
 *
 * @package Joomla connector launch
 * @version 1.2
 * @author webformatique
 * @copyright (C) 2010- webformatique
 * @license GNU/GPLv3 http://www.gnu.org/copyleft/gpl.html
 */
defined( '_JEXEC' ) or die( 'Restricted access' );
require_once JPATH_ROOT . DS . 'administrator' . DS . 'components' . DS . 'com_resmania' . DS . 'classes' . DS . 'RM' . DS . 'Joomla' . DS . 'Connector.php';

RM_Connector::setup('RM_Joomla_Connector', 'user');
$connector = RM_Connector::getInstance();
$connector->connect();

// this allows template designers to provide a resmania.css override
$app =& JFactory::getApplication();
if (file_exists(JPATH_ROOT . DS . 'templates' . DS . $app->getTemplate() . DS . 'css' . DS . 'resmania.css')){
    echo '<link rel="stylesheet" href="'.JURI::base() . 'templates/' . $app->getTemplate() . '/css/resmania.css"  type="text/css" />';
}
?>